|
|
|
|
|
|
|
This chapter begins a section on Visual Basic and the Internet. The Internet is one of the most talked-about topics in computers today. Although the Internet has been around a long time, until just a few years ago, it remained out of the public eye, used mostly by the academic world. However, today everyone seems to have an e-mail address and a Web site. In this book, you learn several methods of applying your VB knowledge to the Internet. This chapter serves as an overview of VBScript, a subset of Visual Basic that can be used to program the Internet. |
|
|
|
|
|
|
|
|
The Visual Basic language comes in several flavors besides the "traditional" standalone development tool it has always been. One of those flavors is Visual Basic for Applications (VBA). Another flavor, not to be confused with VBA, is the Visual Basic scripting language, or VBScript. Descriptions of all three appear in Table 30.1. |
|
|
|
|
| Table 30.1 VB Versus VBA Versus VBScript | | Language | Description | | Visual Basic | Standalone development environment that allows you to compile executable files, ActiveX Controls, and DLLs. | | VBA | The version of Visual Basic designed to be used within an application, such as Excel, Access, or Visio. Starting with Microsoft Office 97, VBA and VB share the same IDE. | | VBScript | Small subset of the VB language interpreted by Internet Explorer, Internet Information Server, Microsoft Outlook, and the Windows Scripting Host. |
|
|
|
|
|
|
The VBScript language itself does not have anywhere near the power of VB or VBA, nor does it have its own development environment. These limitations are by design, however. The strength of VBScript is not in the language itself, but how and where it can be used, such as the following: |
|
|
|
|
|
|
|
|
Web pagesClient-side VBScript code can be embedded in standard HTML, allowing Web pages to contain application-like functionality. |
|
|
|
|
|
|
|
|
Active Server PagesServer-side VBScript code can be used in Active Server Pages, allowing Web pages to be generated and altered before returning content to a browser. |
|
|
|
|
|
|
|
|
The Windows Scripting HostVisual Basic script code can be run from the DOS command line like a batch file, allowing you to automate certain tasks. |
|
|
|
|
|
|
|
|
Enhancing the Internet with VBScript |
|
|
|
|
|
|
|
|
VBScript was first introduced for use with the Internet. The Internet itself is a physical network of computers. However, when most people think of the Internet, they do not think about the network but about specific applications used with it. The following are some examples of these applications: |
|
|
|
|
|